import {$get, $post} from '../utils/request';
import {$msg_s, $msg_e} from '../utils/msg';

//添加房间照片
export const add = (params) => {
  let res = $post('RoomImg/Add', params);

  res = {
    success: true,
    message: '添加房间照片成功',
  }

  return res.success;
}

//查询房间照片
export const list = (params) => {
  let res = $get('RoomImg/List', params);

  res = [
    {
      roomImgId: 1,
      roomId: '101',
      imgUrl: 'picture1.jpg',
    },
    {
      roomImgId: 2,
      roomId: '101',
      imgUrl: 'picture2.jpg',
    },
    {
      roomImgId: 3,
      roomId: '101',
      imgUrl: 'picture3.jpg',
    },
  ];

  return res;
}

//删除房间照片
export const del = (params) => {
  let res = $post('RoomImg/Delete', params);

  res = {
    success: true,
    message: '删除房间照片成功',
  }

  return res.success;
}